import fetch from 'utils/fetch';

//代理商待审核 
export function agentAll(data) {
  return fetch({
    url: 'api/admin/distributor/selectDistributorAll',
    // url: 'api/admin/distributor/screenSelectDistributor',
    method: 'post',
    headers: {'Content-type': 'application/json;charset=UTF-8'},
    data:data
  });
}

//代理商详情
export function agentDetails(id) {
  return fetch({
    url: 'api/admin/distributor/getDistributorIdFindDistributor/'  + id,
    method: 'get',
    headers: {'Content-type': 'application/json;charset=UTF-8'}
  });
}

//审核代理商 data 数据： id userId state
export function updateStateAgent(data) {
  return fetch({
    url: 'api/admin/distributor/updateState' ,
    method: 'post',
    headers: {'Content-type': 'application/json;charset=UTF-8'},
    data:data
  });
}